//
//  BK_SOD_Type_Cell.m
//  bestkeep
//
//  Created by TOPTEAM on 2017/3/31.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BK_SOD_Type_Cell.h"
#import <Masonry.h>
#import "BK_OD_Color.h"
#define WIDTH_IMGV   60
@interface BK_SOD_Type_Cell ()

@property (nonatomic,strong) UIView * view_back;
@property (nonatomic,strong) UILabel* lab_order;
@property (nonatomic,strong) UILabel* lab_DingDanHao;
@property (nonatomic,strong) UILabel* lab_timeSubmit;
@property (nonatomic,strong) UILabel* lab_time_submit;
@property (nonatomic,strong) UILabel* lab_typePay;
@property (nonatomic,strong) UILabel* lab_type_pay;

@property (nonatomic,strong) UIView * view_line;


@end


@implementation BK_SOD_Type_Cell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        self.backgroundColor = [UIColor whiteColor];
        [self initView];
    }
    return self;
}

- (void)initView{
    
    
    /**
     * 背景View---白色
     */
    _view_back =[[UIView alloc]init];
    _view_back.backgroundColor=[UIColor whiteColor];
    [self addSubview:_view_back];
    [_view_back mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).offset(0);
        make.left.equalTo(self.mas_left).offset(0);
        make.width.mas_equalTo(@(ScreenWidth));
        make.bottom.equalTo(self.mas_bottom);
    }];
    
    /**
     *  订单号
     */
    _lab_order = [UILabel new];
    _lab_order.textColor = kOrderBlack1;
    _lab_order.numberOfLines = 2;
    _lab_order.backgroundColor = [UIColor clearColor];
    _lab_order.font = [UIFont systemFontOfSize:14];
    _lab_order.text = @"订 单 号： ";
    [self addSubview:_lab_order];
    [_lab_order mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).mas_offset(ApplicationBackGauge);
        make.top.equalTo(self.mas_top).mas_offset(10);
    }];
    
    _lab_DingDanHao = [UILabel new];
    _lab_DingDanHao.textColor = kOrderBlack1;
    _lab_DingDanHao.numberOfLines = 2;
    _lab_DingDanHao.backgroundColor = [UIColor clearColor];
    _lab_DingDanHao.font = [UIFont systemFontOfSize:14];
    _lab_DingDanHao.text = @"加载中...";
    [self addSubview:_lab_DingDanHao];
    [_lab_DingDanHao mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_lab_order.mas_right).mas_offset(10);
        make.top.equalTo(_lab_order.mas_top).mas_offset(0);
    }];
    
    
    
    /**
     *  lab_time_submit;//下单时间
     */
    _lab_timeSubmit= [[UILabel alloc]initWithFrame:CGRectZero];
    _lab_timeSubmit.textColor = kOrderBlack1;
    _lab_timeSubmit.text = @"下单时间：";
    _lab_timeSubmit.font = [UIFont systemFontOfSize:14];
    [self addSubview:_lab_timeSubmit];
    [_lab_timeSubmit mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_lab_order.mas_left).mas_offset(0);
        make.top.equalTo(_lab_DingDanHao.mas_bottom).mas_offset(2);
    }];
    
    _lab_time_submit = [UILabel new];
    _lab_time_submit.textColor = kOrderBlack1;
    _lab_time_submit.numberOfLines = 1;
    _lab_time_submit.backgroundColor = [UIColor clearColor];
    _lab_time_submit.font = [UIFont systemFontOfSize:14];
    _lab_time_submit.text = @"加载中...";
    [self addSubview:_lab_time_submit];
    [_lab_time_submit mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_lab_DingDanHao.mas_left).mas_offset(0);
        make.top.equalTo(_lab_timeSubmit.mas_top).mas_offset(0);
        make.centerY.equalTo(_lab_timeSubmit.mas_centerY);
    }];
    
    
    
    /**
     *
     */
    _lab_typePay= [[UILabel alloc]initWithFrame:CGRectZero];
    _lab_typePay.textColor = kOrderBlack1;
    _lab_typePay.text = @"支付方式：";
    _lab_typePay.font = [UIFont systemFontOfSize:14];
    [self addSubview:_lab_typePay];
    [_lab_typePay mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_lab_timeSubmit.mas_left).mas_offset(0);
        make.top.equalTo(_lab_timeSubmit.mas_bottom).mas_offset(2);
    }];
    
    
    _lab_type_pay = [UILabel new];
    _lab_type_pay.textColor = kOrderBlack1;
    _lab_type_pay.numberOfLines = 1;
    _lab_type_pay.backgroundColor = [UIColor clearColor];
    _lab_type_pay.font = [UIFont systemFontOfSize:14];
    _lab_type_pay.text = @"加载中...";
    [self addSubview:_lab_type_pay];
    [_lab_type_pay mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_lab_DingDanHao.mas_left).mas_offset(0);
        make.top.equalTo(_lab_typePay.mas_top).mas_offset(0);
        make.centerY.equalTo(_lab_typePay.mas_centerY);
    }];
    
    
    
    
    
    
//    /**
//     *  下划线
//     */
//    _view_line = [UILabel new];
//    _view_line.backgroundColor = [UIColor grayColor];
//    _view_line.alpha = 0.5;
//    [_view_back addSubview:_view_line];
//    [_view_line mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.bottom.mas_equalTo(_view_back.mas_bottom).offset(0);
//        make.right.mas_equalTo(_view_back.mas_right).offset(-ApplicationBackGauge);
//        make.left.mas_equalTo(_view_back.mas_left).offset(ApplicationBackGauge);
//        make.height.mas_equalTo(@(0.5));
//    }];
    
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(CGFloat)computeHeight:(id)data
{
    return 90;
}
@end
